package com.meida.paotui.bus.client.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.meida.common.mybatis.annotation.TableAlias;
import com.meida.common.mybatis.base.entity.AbstractEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * 交易表
 *
 * @author flyme
 * @date 2019-11-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("bus_trade")
@TableAlias("trade")
@ApiModel(value="BusTrade对象", description="交易表")
public class BusTrade extends AbstractEntity {

private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "tradeId", type = IdType.ID_WORKER)
    private String tradeId;

    @ApiModelProperty(value = "用户Id")
    private Long userId;

    @ApiModelProperty(value = "状态")
    private Integer status;

    @ApiModelProperty(value = "交易类型")
    private Integer tradeType;

    @ApiModelProperty(value = "交易说明")
    private String tradeExplain;

    @ApiModelProperty(value = "交易关联ID")
    private String businessId;

    @ApiModelProperty(value = "备注")
    private String memo;

    @ApiModelProperty(value = "余额")
    private BigDecimal balance;

    @ApiModelProperty(value = "交易金额")
    private BigDecimal tradeSum;

    @ApiModelProperty(value = "0 金额减少  1金额增加")
    private Integer type;

}
